package cn.edu.scau.cmi.dengzejun.chapter09;

public class Example9_3 {
	public static void main(String args[]) {
		String path = "C:\\book\\javabook\\Java Programmer.doc";
		int index = path.indexOf("\\");
		System.out.println("the index = "+index);
		index = path.indexOf("\\",index);
		System.out.println("the index = "+index);
		String sub = path.substring(index);
		System.out.println(sub);
		index = path.lastIndexOf("\\");
		System.out.println("the index = "+index);
		sub = path.substring(index+1);
		System.out.println(sub);
		System.out.println(sub.contains("Programmer"));
		return;
	}
}
